using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for BaseUserControl
/// </summary>
public class BaseUserControl : UserControl
{
    public BaseUserControl()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    public new BasePage Page
    {
        get
        {
            if (base.Page is BasePage)
                return (BasePage)base.Page;
            else
            {
                string message = string.Format("Page of type '{0}' does not inherit from BasePage", base.Page.GetType().ToString());
                throw new ApplicationException(message);
            }
        }
    }
}
